#ifndef __IF_NETIO_API_H__
#define __IF_NETIO_API_H__

#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <unistd.h>
#include <netio/netio.h>
#include <tmc/alloc.h>
#include <tmc/cpus.h>
#include <tmc/sync.h>
#include <tmc/task.h>

#define NETIO_FLOWS 32
typedef struct if_netio_instance_t_ {
    char interface[8];
    netio_queue_t queue;
    int work_size;
    int work_rank;
    unsigned int rx_counter;
    unsigned int tx_counter;
    unsigned int tx_retry_counter;
    unsigned int tx_busy_counter;
    unsigned int tx_err_counter;
} netio_instance_t;

netio_instance_t *if_netio_init(char *ifname, int work_size, int work_rank);
void show_netio_stat(netio_instance_t *instance);

#endif
